home *** CD-ROM | disk | FTP | other *** search
/ PC & Mediji 1998 February / PCM_9802.iso / programi / director / data.z / Behavior Library.cst / 00020_Script_Sound Beep < prev    next >
Text File  |  1997-05-09  |  2KB  |  68 lines

  1. -- Sound System Beep
  2.  
  3. -- Media
  4. -- drag to a sprite 
  5. -- also functions through lingo by handling message 'initBeep', 
  6. -- for example if this behavior was assigned to sprite 5, use
  7. -- sendsprite 5, #initBeep
  8.  
  9. property whichEvent
  10.  
  11. on initBeep me
  12.   beep
  13. end
  14.  
  15. on mouseUp me
  16.   if the whichevent of me = #mouseUp    then beep
  17. end
  18.  
  19. on mouseDown me
  20.   if the whichevent of me = #mouseDown  then beep
  21. end
  22.  
  23. on mouseWithin me
  24.   if the whichevent of me = #mouseWithin  then beep
  25. end
  26.  
  27. on prepareFrame me
  28.   if the whichevent of me = #prepareFrame then beep
  29. end
  30.  
  31. on mouseEnter me
  32.   if the whichevent of me = #mouseEnter then beep
  33. end
  34.  
  35. on mouseLeave me
  36.   if the whichevent of me = #mouseLeave then beep
  37. end
  38.  
  39. on enterFrame me
  40.   if the whichevent of me = #enterFrame then beep
  41. end
  42.  
  43. on exitFrame me
  44.   if the whichevent of me = #exitFrame  then beep
  45. end
  46.  
  47. ---
  48.  
  49. on getPropertyDescriptionList
  50.   
  51.   set p_list = [ ¼
  52.     #WhichEvent: [ #comment:   "Initializing Event:", ¼
  53.                     #format:   #symbol, ¼
  54.                      #range: [ #mouseUp, #mouseDown, #mouseWithin, #mouseEnter, #mouseLeave, ¼
  55.                                #prepareFrame, #enterFrame, #exitFrame, #initBeep ], ¼
  56.                    #default:   #MouseUp ] ¼
  57.                  ]
  58.   return p_list  
  59.   
  60. end
  61.  
  62. on getBehaviorDescription
  63.   return ¼
  64. "Plays the system beep sound when the specified event occurs." & RETURN & ¼
  65. "ò Initializing Event - Specify the event that triggers the behavior."
  66. end
  67.  
  68.